#!/bin/bash

mkdir -p `pwd`/data/files
mkdir -p `pwd`/data/sqlite
mkdir -p `pwd`/data/config
mkdir -p `pwd`/data/plugins

# touch `pwd`/data/config/configuration.yaml
# -v `pwd`/data/config/configuration.yaml:/usr/src/redmine/config/configuration.yml \
# -v `pwd`/data/files:/usr/src/redmine/files \
# -v `pwd`/data/sqlite:/usr/src/redmine/sqlite \
# -v `pwd`/data/plugins:/usr/src/redmine/plugins \

podman run -d -p 3000:3000 \
docker.io/library/redmine:4.2.1 


bundle config mirror.https://rubygems.org https://gems.ruby-china.com
bundle install

RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=agile
